
/* Metadata */
body:not(.callout-no-metadata) .callout.callout[data-callout~="Metadata" i] {
    --callout-icon: layers;

    &:not(
        [data-callout-metadata*="bg-"],
        [data-callout-metadata*="bg-c-"], 
        [data-callout-metadata*="c-"],
        [data-callout-metadata*="color-"]
    ) {
        --callout-color: 82, 139, 212;
    }

    --callout-border-width: 2px;
    // --callout-padding: 10px 24px 24px 24px;
    --callout-title-padding: 5px;
    --callout-content-padding: 0px 10px 10px;
    --callout-shadow: 0px 0px 0px 1px var(--outline);
    
    // Title
    & .callout-title { 
        // padding: 5px; 
        background-color: transparent; 
        justify-content: center; 
    }
    // & .callout-icon { padding-bottom: 6px;}
    // & .callout-fold { color: rgb(var(--callout-color)) }
    & .callout-title-inner { 
        flex: unset;
        color: rgb(var(--callout-color)); 
    }
    // Fields
    &:not(
        [data-callout-metadata~="no-strong"], [data-callout-metadata~="no-str"]
    ) { --bold-color: rgb(var(--callout-color)) }
    & .dataview.inline-field-key {
        background: rgb(var(--callout-color));
        color: var(--text-on-accent);
        font-weight: 900;
    }
    & .dataview.inline-field-value {
        font-weight: unset;
        background:transparent
    }
    
    // Table
    & table th { background-color: var(--aside-bg, rgba(var(--callout-color), 0.5)); }
    & table { 
        --tbl-td-h: 0;
        --tbl-td-w: 5px;
        
        white-space: nowrap;
        margin: 0; 
        // margin: auto;
        width: 100%;
    }
    
    & .callout-content p:last-child  { margin-bottom: 0; }
    & .callout-content p:first-child { margin-top: 0; }
    & .callout-content,
    & ul
    { margin: 0; }


    // ITS <i> Attribute Styling
    &[data-callout-metadata~="i-at"] {
        background: var(--outer-bar, var(--background-secondary-alt));
        border: 0;
        text-align: center;
        padding: 0;

        &:is(
            [data-callout-metadata*="bg-"],
            [data-callout-metadata*="bg-c-"], 
            [data-callout-metadata*="c-"],
            [data-callout-metadata*="color-"]
        ) 
        { background: rgba(var(--callout-color), var(--callout-color-opacity)); }
        
        &.is-collapsible:not(.is-collapsed) {
            display: flex;
            flex-direction: row-reverse;
        }

        
        &:not(.is-collapsible) .callout-title,
        & .callout-title-inner,
        &:not(.is-collapsed) .callout-icon 
        { display: none; }

        & .callout-fold {
            display: flex;
            align-content: center;
            align-items: center;
            
            & svg { margin-bottom: unset; }
        }
        
        & .callout-content { 
            padding: 0px; 
            margin: auto; 
            overflow-y: hidden;
        }

    }

    //Lineless Tables
    &:is([data-callout-metadata~="tbl-cln"], [data-callout-metadata~="table-clean"]) {
        & table :is(td, tr, th) {
            background-color: transparent;
            border-color: transparent;
        }
    }

    &[data-callout-metadata*="bg-"] {
        --callout-border-color: var(--callout-background);
        border-color: var(--callout-border-color);
    }
}
